package com.ahucoding.rocket.common.constants;

/**
 * 通用常量信息
 *
 * @author yang
 */
public class Constants {
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * www主域
     */
    public static final String WWW = "www.";

    /**
     * RMI 远程方法调用
     */
    public static final String LOOKUP_RMI = "rmi:";

    /**
     * LDAP 远程方法调用
     */
    public static final String LOOKUP_LDAP = "ldap:";

    /**
     * LDAPS 远程方法调用
     */
    public static final String LOOKUP_LDAPS = "ldaps:";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 登录成功状态
     */
    public static final String LOGIN_SUCCESS_STATUS = "0";

    /**
     * 登录失败状态
     */
    public static final String LOGIN_FAIL_STATUS = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码有效期（分钟）
     */
    public static final long CAPTCHA_EXPIRATION = 2;

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    public static final String[] JOB_WHITELIST_STR = {"com.subway"};

    /**
     * 定时任务违规的字符
     */
    public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", "org.springframework", "org.apache", "com.subway.common.core.utils.file"};

    /**
     * 记录软删除标记，0未删除，1已删除
     */
    public static int DELETED_MARK = 1;
    public static int READ_MARK = 1;

    /**
     * 数据有效性 --> 有效
     */
    public static Long VALID_DATA = 1L;

    /**
     * 数据有效性 --> 无效
     */
    public static Long IN_VALID_DATA = 0L;

    /**
     * 黑名单禁用标记，0正常，1禁用
     */
    public static final Integer DISABLED_MARK = 1;
    public static final Integer ENABLED_MARK = 0;

    /**
     * 文档类型树根节点，0L
     */
    public static final Long ROOT_NODE = 0L;

    /**
     * 文档类型树层级，0、1、2、3级
     */
    public static final Integer LAYER_0 = 0;
    public static final Integer LAYER_1 = 1;
    public static final Integer LAYER_2 = 2;
    public static final Integer NEXT_LAYER = 1;

    /**
     * 大型设备审核状态
     */
    public static final String UNCHECK = "0";
    public static final String CHECK_APPROVE = "1";
    public static final String CHECK_REFUSE = "2";

    /**
     * 大型设备进场状态
     */
    public static final String CRANE_STATUS_DEFAULT = "0";  //未进场
    public static final String CRANE_STATUS_ENTRY = "1"; //进场
    public static final String CRANE_STATUS_EXIT = "2"; //已退场

    /**
     * 大型设备录入状态
     */
    public static final Integer CRANE_INUSE = 1; //已录入
    public static final Integer CRANE_NOT_INUSE = 0; //未录入


    /**
     * 大型设备作业状态
     */
    //审批打回
    public static final String JOB_STATUS_APPROVAL_REFUSED = "-1";
    //审批发起
    public static final String JOB_STATUS_UN_APPROVAL = "0";
    //监理单位审批
    public static final String JOB_STATUS_APPROVALED = "1";
    //现场旁站确认
    public static final String JOB_STATUS_CONFIRMED = "2";
    //旁站信息上传
    public static final String JOB_STATUS_UPLOADED = "3";
    //作业完成
    public static final String JOB_STATUS_FINISHED = "4";

    /**
     * 管线保护作业，是否外部作业
     */
    public static final String NOT_OUTER_WORK = "0";
    public static final String IS_OUTER_WORK = "1";

    /**
     * 管线保护作业状态
     */
    //审批打回
    public static final String WORK_STATUS_APPROVAL_REFUSED = "-1";
    //申请发起
    public static final String WORK_STATUS_APPLY_START = "0";
    //监理审批
    public static final String WORK_STATUS_SUPERVISION_APPROVAL = "1";
    //业主单位审批
    public static final String WORK_STATUS_OWNER_APPROVAL = "2";
    //现场旁站确认
    public static final String WORK_STATUS_SCENE_CONFIRM = "3";
    //旁站信息上传
    public static final String WORK_STATUS_INFO_UPLOAD = "4";
    //作业完成
    public static final String WORK_STATUS_FINISH = "5";

    /**
     * 大型设备作业默认 作业信息类型
     */
    public static final String INFO_TYPE_DEFAULT = "1";

    /**
     * 大型设备类型
     */
    //履带式
    public static final String CRANE_TYPE_TRACK = "1";
    //汽车式
    public static final String CRANE_TYPE_VEHICLE = "2";
    //门式
    public static final String CRANE_TYPE_GATE = "3";
    //塔式
    public static final String CRANE_TYPE_TOWER = "4";
    //盾构机
    public static final String CRANE_TYPE_SHIELD = "5";
    //桩机
    public static final String CRANE_TYPE_PILE = "6";

    /**
     * 大型设备模块，人员及设备入库状态
     *  0 - 未入库
     *  1 - 已入库
     */
    public static final Integer CRANE_LIBED_MARK = 1;
    public static final Integer CRANE_NOT_LIB_MARK = 0;

    /**
     * 登录考勤状态
     */
    public static final Integer USER_ONLINE_RECORD_DEFAULT = 0;
    public static final Integer USER_ONLINE_RECORD_DUTY = 1;

    /**
     * 频率管理审核状态 --> review_status
     * 0-待审核
     * 1-已退回
     * 2-已审核
     */
    public static Long REVIEWED = 0L;
    public static Long RETURNED = 20L;
    public static Long AUDITED = 10L;
}
